<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app"></div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const {ref,watch,reactive,watchEffect }=Vue
    const app=Vue.createApp({
        template:`
        First Name:<input v-model="firstName" /><br>
        Last Name:<input v-model="lastName" /><br>
        Full Name:<input v-model="fullName" /><br>
        岗位:<input v-model="job.type"/><br>`,
        setup(props) {
            let firstName=ref('田');
        let lastName=ref('嘉');
        let fullName=ref('');
        let job=reactive({
                type:'java开发工程师',salary:'25k'
            })
            watchEffect(function()  {
                console.log('watchEffect')
                fullName.value=firstName.value+lastName.value
            })
            return{firstName,lastName,fullName,job}
        }
    })
    app.mount("#app")
</script>
</html>